package com.four.service.impl;

import com.four.dao.CategoryMapper;
import com.four.pojo.Category;
import com.four.service.ICategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author version v1.0
 * @ClassName：
 * @Description：
 **/
@Service("categoryService")
public class CategoryServiceImpl implements ICategoryService {
@Autowired
@Qualifier("categoryMapper")
private CategoryMapper categoryMapper;
    @Override
    public List<Category> findAllCateGory() {
        return categoryMapper.findAllCateGory();
    }

    @Override
    public int addCateGory(Category category) {
        return categoryMapper.addCateGory(category);
    }

    @Override
    public Category findByCateGoryId(int cid) {
        return categoryMapper.findByCateGoryId(cid);
    }

    @Override
    public int updateCateGory(Category category) {
        return categoryMapper.updateCateGory(category);
    }

    @Override
    public int deleteCateGory(int pid) {
        return categoryMapper.deleteCateGory(pid);
    }


}

